Skip to content

docs: [SDK-5858] Swift package setup and v5 to v6 migration guide (2/2) - #921

Open
fadi-george wants to merge 1 commit into
fadi/sdk-5858from
fadi/sdk-5858-docs
Open

fadi-george wants to merge 1 commit into
fadi/sdk-5858from
fadi/sdk-5858-docs

Conversation

@fadi-george

@fadi-george fadi-george commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Description

One Line Summary

Document the v6 requirements and Swift package setup for iOS, and add the v5 to v6 migration guide.

Details

Motivation

#920 replaces CocoaPods with the OneSignal-XCFramework Swift package and requires Unity 6. The docs still said Unity 2022.3, said to install CocoaPods, and pointed to the .xcworkspace for CocoaPods reasons.

Scope

  • README.md (and the bundled copy in examples/demo/Assets/OneSignal):
    • Requirements: Unity 6.0.23f1 or newer, no CocoaPods.
    • iOS steps: open the workspace if EDM created one, otherwise the .xcodeproj.
    • The location section, and a note in "Upgrading to 6.x.x" linking the migration guide.
  • New MIGRATION_GUIDE_v5_to_v6.md:
    • Renamed packages, Unity EDM and Unity 6.
    • Upgrade steps: the removed EDM file, and a Replace build.
    • Moving custom extension targets to OneSignalSwiftPackage.AddProduct.
    • Location toggling.
  • ASSET_STORE_PACKAGES.md: Unity 6 minimum, and verification in Unity 6.0 LTS.
  • Demo READMEs: drop CocoaPods, rsync and the pod XML.
  • Docs only, no code changes.

Stack:

  1. feat: [SDK-5858] add OneSignal to iOS builds as a Swift package (1/2) #920 Swift package instead of CocoaPods
  2. This PR

Testing

Manual testing

Docs only. validate-unity-distribution.py passes.

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fadi-george
fadi-george removed this pull request from stack #922 December 1, 2026 01:19
@fadi-george fadi-george changed the title docs: [SDK-5858] Swift package setup and v5 to v6 migration guide (2/2) docs: [SDK-5858] Swift package setup and v5 to v6 migration guide (3/3) Dec 1, 2026
@fadi-george
fadi-george added this pull request to stack #924 December 1, 2026 01:20
@fadi-george fadi-george changed the title docs: [SDK-5858] Swift package setup and v5 to v6 migration guide (3/3) docs: [SDK-5858] Swift package setup and v5 to v6 migration guide (2/2) Dec 1, 2026

@abdulraqeeb33 abdulraqeeb33 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Unity 6 floor (6000.0.23f1), deleting OneSignaliOSDependencies.xml on editor load, and the NSE / location product split all match the postprocessor. Three holes in the upgrade writeup:

  1. The Asset Store README links the new guide at blob/main (examples/demo/Assets/OneSignal/README.md:59). That file is not on main or v6, and this stack merges to v6. The v2 and v3 guides are files next to that README, the inventory exports them, and those links are relative. Copy MIGRATION_GUIDE_v5_to_v6.md into examples/demo/Assets/OneSignal/ with a .meta, add both paths to OneSignalFileInventory.asset, and link MIGRATION_GUIDE_v5_to_v6.md. The bundled README also has no location section, so that copy has to carry the "leave OneSignalLocation out" note.

  2. Step 1 says to update the OneSignal packages to 6.0.0 (MIGRATION_GUIDE_v5_to_v6.md:14). v5 is com.onesignal.unity.core, .android, and .ios. v6 is com.onesignal.unitysdk.* at 6.0.0. Package Manager will not offer 6.0.0 as an update of the old name. Say to remove the old three and add the new three.

  3. The guide says AddProduct does nothing when the target already links the product (MIGRATION_GUIDE_v5_to_v6.md:35). GetOrAddReference re-pins an older requirement to OneSignalSwiftPackage.Version before that return (OneSignalSwiftPackage.cs:48). The snippet also does not compile. PBXProject needs using UnityEditor.iOS.Xcode, and projectPath is never set:

using UnityEditor.iOS.Xcode;
using OneSignalSDK.iOS;

var projectPath = PBXProject.GetPBXProjectPath(outputPath);
var project = new PBXProject();
project.ReadFromFile(projectPath);

var widgetGuid = project.TargetGuidByName("OneSignalWidgetExtension");
OneSignalSwiftPackage.AddProduct(project, widgetGuid, "OneSignalFramework");

project.WriteToFile(projectPath);

Say it skips a second product link and still re-pins. OneSignalFramework on OneSignalWidgetExtension matches the demo.

Nit: examples/demo-no-location/README.md:104 still lists Android 5.9.5. OneSignalAndroidDependencies.Version is 5.11.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants